<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/pages/templates/templateMain.xhtml">

	<ui:param name="browser_tab_title" value="Edit Repository" />
	<ui:param name="page_title"
		value="Add new repository / Edit existing repository" />

	<ui:define name="content">

		<p:panel>
			<f:facet name="header">
				<h:outputText value="Repository Form" />
			</f:facet>

			<h:form id="repositoryForm">
				<h:panelGrid columns="3">
					<h:outputLabel value="Name:*" />
					<h:inputText value="#{repository.name}" id="name">
						<rich:ajaxValidator summary="Invalid name" event="onblur" />
					</h:inputText>
					<rich:message for="name" />

					<h:outputLabel value="Description:*" />
					<h:inputText value="#{repository.description}" id="description">
						<rich:ajaxValidator summary="Invalid description" event="onblur" />
					</h:inputText>
					<rich:message for="description" />

					<h:outputLabel value="URL:*" />
					<h:inputText value="#{repository.url}" id="url">
						<rich:ajaxValidator summary="Invalid url" event="onblur" />
					</h:inputText>
					<rich:message for="url" />
				</h:panelGrid>

				<br />
				<h:outputLabel value="* required fields." />
				<br />
				<br />

				<p:commandButton id="buttonCancel" value="Cancel" action="cancel"
					immediate="true" ajax="false" />
				<p:commandButton id="buttonSave" value="Save"
					action="#{editRepositoryBean.saveRepository}" ajax="false" />
			</h:form>
		</p:panel>

	</ui:define>
</ui:composition>